# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import base64CodecConstants

class Base64CodecSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(Base64CodecSubDirectiveTree, self).__init__(parent)
        self.createBase64CodecTreeNode()

    def createBase64CodecTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "base64Codec"
        self.setText(0,"Base64编解码")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, base64CodecConstants.Base64CodecConstants.base64EncodingDirective, "Base64编码")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, base64CodecConstants.Base64CodecConstants.base64DecodingDirective, "Base64解码")